<template>

    <h2>快捷登录</h2>
    <van-form @submit="onSubmit">
        <van-cell-group inset>
            <van-field v-model="username" name="username" placeholder="请输入您的手机号"
                :rules="[{ required: true, message: '请输入手机号' }]" />


            <van-field v-model="sms" center clearable placeholder="请输入验证码">
                <template #button>
                    <van-button size="small" type="primary">获取验证码</van-button>
                </template>
            </van-field>
            <p><van-checkbox v-model="checked">已阅读并同意 <span style="color: orange;">《乐友服务协议》</span> 、<span
                        style="color: orange;">《隐私保护政策》及<span
                            style="color: orange;">儿童个人信息保护规则</span></span></van-checkbox></p>
        </van-cell-group>
        <div style="margin: 16px;">
            <van-button round block type="primary" native-type="submit" @click="dl">
                登录
            </van-button>
        </div>
    </van-form>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from "vue-router";
const router=useRouter()
const checked = ref(true);
const username = ref('');
const sms = ref('');
const dl =()=>{
router.push('./home/index')    
}
</script>

<style lang="scss" scoped></style>